You are here: COM API reference > Designer object > ApplyChanges method

ApplyChanges method

ApplyChanges is called on each page when the user clicks OK, Apply, or Finish. The page should use this method to save all new information to the vault.

Parameters

EditMode

This value is required as an input argument to the m_Designer.ApplyChanges call.

Remarks

By default m_Designer.ApplyChanges is called to make the interface extension designer save the changed property values to the vault. This code should never be removed.

The default implementation of this method in the BC Meridian Template Form is as follows:

Private Sub IAMExtensionPage_ApplyChanges(ByVal EditMode As PPEDITMODES)
    On Error GoTo Error_handler
    
    Me.ValidateControls
    If Not m_Designer Is Nothing Then
        ' Todo
        ' Add your code here
        m_Designer.ApplyChanges EditMode
    End If
    
    Exit Sub
Error_handler:
    MsgBox caption & " ApplyChanges: " & Err.Description
End Sub

The interface extension designer will automatically save the values for data-bound controls. For other properties, code needs to be added to save their value. This code should be inserted before the call to m_Designer.ApplyChanges.

Property values can be saved using the interface extension designer API or the IASDocument interface.

Using the server API directly degrades performance and can have side effects because the interface extension designer caches intermediate values.

Example

Private Sub IAMExtensionPage_ApplyChanges(ByVal EditMode As PPEDITMODES)
    On Error GoTo Error_handler
    Me.ValidateControls
    If (Not m_Designer Is Nothing) Then
        ' Save value for Drawing Number
        m_Designer.SetPropertyValue "", "DrawingNumber_BSTR",  ammDrawingNumber_BSTR.Text
        m_Designer.ApplyChanges EditMode
    End If
    
    Exit Sub
Error_handler:
    MsgBox caption & " ApplyChanges: " & Err.Description
End Sub

Related information

Accessing properties using the designer object

Accessing properties using the IASDocument interface


www.bluecieloecm.com